package com.lh.common.entity.admin;

import com.lh.common.annotation.ExcelExportRule;
import com.lh.common.annotation.ExcelFile;
import com.lh.common.enums.*;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.ibatis.type.Alias;

import javax.persistence.Column;
import javax.persistence.Id;
import java.io.Serializable;
import java.math.BigDecimal;

/**
 * @author FH
 * @ClassName: OrderList
 * @Description: (类作用)
 * @date: 2020-05-18 15:09
 */
@ExcelFile(titleName = "普通商品订单")
@Alias("orderList")
@Data
public class OrderList implements Serializable {

    @ApiModelProperty(value = "订单id")
    @Id
    @Column(name = "oid")
    private Long oid;

    @ApiModelProperty(value = "订单号")
    @ExcelExportRule(label = "订单号")
    private String orderItem;

    @ApiModelProperty(value = "订单时间")
    @ExcelExportRule(label = "订单时间")
    private String createTime;

    @ApiModelProperty(value = "用户名")
    @ExcelExportRule(label = "用户名")
    private String name;

    @ApiModelProperty(value = "手机号")
    @ExcelExportRule(label = "手机号")
    private String phone;

    @ApiModelProperty(value = "商品名称")
    @ExcelExportRule(label = "商品名称")
    private String shopName;

    @ApiModelProperty(value = "商品价格")
    @ExcelExportRule(label = "商品价格")
    private BigDecimal price;

    @ApiModelProperty(value = "购买次数")
    @ExcelExportRule(label = "购买次数")
    private int num;

    @ApiModelProperty(value = "支付金额")
    @ExcelExportRule(label = "支付金额")
    private BigDecimal payPrice;

    @ApiModelProperty(value = "订单状态  TOPAY:待付款; INPAY:支付中; TOSHIP:待发货; OUTSTOCK:已出库; SHIPED:已发货; COMPLETED:已完成;  CANCELLED:已取消;PAYOVERTIME:支付超时已取消,PAYCANCEL:支付失败已取消; ACTIVITYLOSE:支付失败;REFUNDING:退款中;REFUNDED:完成退款")
    @ExcelExportRule(label = "订单状态")
    private OrderStatusEnum orderStatus;

    @ApiModelProperty(value = "出库按钮是否可操作  YES:可以; NO:不可以;")
    @Column(name = "type")
    private IF type;

}